package com.my.xq.repository;

import java.util.List;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.Query;

import com.my.xq.domain.OptionQueryParam;
import com.my.xq.domain.entity.Option;
import com.sskj.core.query.annotation.DynamicQuery;
import com.sskj.core.repository.GenericRepository;

public interface OptionRepository extends GenericRepository<Option, String> {
	@DynamicQuery
	Page<Option> findPage(OptionQueryParam oqp,Pageable pageable);
	
	@Query("SELECT r FROM Option r " + "where r.planid = ?1 order by r.createdTime desc")
	List<Option> findAllOptionByPlan(String planid);
}
